import request from '@/utils/request'
import defaultSettings from '@/settings'

// 提交
export function submit(data) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/transactionManage/batchFile/BacthFileUpload/submit`,
    method: 'post',
    data:data
  })
}

//审核交易查询
export const apiUrlApproveConfig = {
  queryUrl: `${defaultSettings.ctx.cnapsApp}/transactionManage/batchFile/BacthFileUploadApprove/search`,
}

// 详情
export function approveDetail(data) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/transactionManage/batchFile/BacthFileUploadApprove/detail`,
    method: 'post',
    params:data
  })
}


// 审核
export function approve(data) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/transactionManage/batchFile/BacthFileUploadApprove/approve`,
    method: 'post',
    data: { id:data.id,procInfo:data.procInfo }
  })
}

// 审核
export function approveAll(ids) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/transactionManage/batchFile/BacthFileUploadApprove/approveAll`,
    method: 'post',
    params: { ids:ids }
  })
}


// 审核拒绝
export function reject(data) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/transactionManage/batchFile/BacthFileUploadApprove/reject`,
    method: 'post',
    data: { id:data.id,procInfo:data.procInfo }
  })
}

//批量文件上传查询
export const apiUrlQueryConfig = {
  queryUrl: `${defaultSettings.ctx.cnapsApp}/transactionManage/batchFile/BacthFileUploadQuery/search`,
}

//批量文件上传对应交易查询
export const apiUrlQueryDetailConfig = {
  queryUrl: `${defaultSettings.ctx.cnapsApp}/transactionManage/batchFile/BacthFileUploadQuery/detailsearch`,
}


// 查询交易详情
export function queryDetail(data) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/transactionManage/batchFile/BacthFileUploadQuery/detail`,
    method: 'post',
    params:data
  })
}
